package com.kun.music.service.impl;

import com.kun.music.dao.RankMapper;
import com.kun.music.domain.Rank;
import com.kun.music.service.RankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author fangkun
 * @create 2023-01-10-10:18
 */
@Service
public class RankServiceImpl implements RankService {

    @Autowired
    private RankMapper rankMapper;

    @Override
    public boolean addRank(Rank rank) {
        return rankMapper.addRank(rank)>0 ? true : false;
    }

    @Override
    public List<Rank> rankOfSongListId(long songListId) {
        return rankMapper.rankOfSongListId(songListId);
    }
}
